from blog.models import Post


def postindex(request):
    return {'all_posts': Post.objects.filter(active=True)}